body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background-color: #f0f8ff;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    text-align: center;
    user-select: none;
}

#game-container {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #ff4500;
}

#slungus {
    width: 200px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

#slungus:active {
    transform: scale(0.9);
}

#stats {
    font-size: 1.5em;
    font-weight: bold;
}

#powerup-message {
    color: green;
    font-size: 1em;
    font-weight: bold;
    height: 1.2em; /* Reserve space to prevent layout shift */
    transition: opacity 0.3s ease;
}

#win-message {
    color: #ff0000;
    font-size: 2em;
    font-weight: bold;
    text-transform: uppercase;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

#progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 15px 0;
}

#progress-bar {
    width: 0%;
    height: 30px;
    background-color: #4caf50;
    border-radius: 5px;
    transition: width 0.1s linear;
}

.shake {
    animation: shake 0.2s;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

#slungus-container.exploded #slungus {
    display: none;
}

#slungus-container.exploded {
    background-image: url('explosion.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

